package com.ws.entity;

/**
 * @author 王硕
 * @version jdk21
 * @className SalaryCalculator
 * @description
 * @date 2024/11/6 16:53
 */
public class SalaryCalculator {
    public void calculateSalary(Programmer programmer) {
        double salary = programmer.getPsalary();
        System.out.println(programmer.getPname()+"的工资为:"+salary+"K");
    }

    public void calculateSalary(ProjectManager projectManager) {
        double salary = projectManager.getPmsalary()+projectManager.getBonus();
        System.out.println(projectManager.getPmname()+"的工资为:"+salary+"K");

    }
}
